package com.deng.eventflow.core;

import com.deng.eventflow.core.petitpoucet.BrokenChain;
import com.deng.eventflow.core.petitpoucet.NodeFunction;
import com.deng.eventflow.core.petitpoucet.ProvenanceNode;

public class NoOpEventTracker implements EventTracker {
    /**
     * A single instance of this tracker
     */
    public static final NoOpEventTracker instance = new NoOpEventTracker();

    private NoOpEventTracker()
    {
        super();
    }

    @Override
    public NoOpEventTracker getCopy()
    {
        return instance;
    }

    @Override
    public void associateTo(int id, NodeFunction f, int out_stream_index, int out_stream_pos)
    {
        // Do nothing
    }

    @Override
    public void associateToInput(int id, int in_stream_index, int in_stream_pos,
                                 int out_stream_index, int out_stream_pos)
    {
        // Do nothing
    }

    @Override
    public void associateToOutput(int id, int in_stream_index, int in_stream_pos,
                                  int out_stream_index, int out_stream_pos)
    {
        // Do nothing
    }

    @Override
    public ProvenanceNode getProvenanceTree(int proc_id, int stream_index, int stream_pos)
    {
        return BrokenChain.instance;
    }

    @Override
    public void setConnection(int output_proc_id, int output_stream_index, int input_proc_id,
                              int input_stream_index)
    {
        // Do nothing
    }

    @Override
    public void setTo(Processor ... processors)
    {
        // Do nothing
    }
}
